<?php
/* Smarty version 3.1.33, created on 2018-10-18 20:17:59
  from 'F:\xampp\htdocs\php\Homework1017\app\views\case\index.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_5bc879f7709b62_94451297',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'c228d97dd2d86d94cef04ec09b68c6d4bacc96a8' => 
    array (
      0 => 'F:\\xampp\\htdocs\\php\\Homework1017\\app\\views\\case\\index.tpl',
      1 => 1539865078,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5bc879f7709b62_94451297 (Smarty_Internal_Template $_smarty_tpl) {
?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<meta name="Keywords" content="嘉兴东臣信息科技有限公司"/>
		<meta name="Description" content="嘉兴东臣信息科技公司根据全球服务外包产业的发展趋势和中国服务外包产业发展的新特点，借助于世界500强企业Oracle在全球IT教育的领导地位，通过Oracle创新IT人才培训体系和整体解决方案"/>
		
		<link rel="stylesheet" type="text/css" href="app/static/css/amazeui.min.css"/>

		<title>案件列表</title>
	</head>
	<body style="padding: 15px" >
		<h1>案件列表</h1>

		<form class="am-form am-form-inline " style="padding: 10px 0" method="post" action="index.php?action=cases&func=search">
			<div class=" am-form-group am-form-select">
				<select style="width: 100px;" id="doc-select-1" name="option">
					<option value="Name">案件号</option>
					<option value="dealer">承办人</option>
					<option value="status">状态</option>
				</select>
				<span class=" am-form-caret"></span>
			</div>


			<div class="am-form-group">
				<input type="text" name="content" class="" id="doc-ipt-email-1" placeholder="请输入查询你的内容">
			</div>

			<button type="submit" class="am-btn am-btn-default">查询</button>
			<a class="am-btn am-btn-secondary" href="index.php?action=Add&func=add">添加案件</a>
		</form>
		<table class="am-table am-table-bordered am-table-radius am-table-striped">
			<tr>
				<th>编号</th>
				<th>案件号</th>
				<th>承办人</th>
				<th>接收日期</th>
				<th>完成日期</th>
				<th>计划完成日期</th>
				<th>状态</th>
			</tr>

			<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['cases']->value, 'case');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['case']->value) {
?>
				<tr class="
				<?php if (date('Y-m-d H:i:s',time()) > $_smarty_tpl->tpl_vars['case']->value['except_date']) {?>
					am-danger
				<?php } else { ?>
					am-active
				<?php }?>" >

					<td><?php echo $_smarty_tpl->tpl_vars['case']->value['c_id'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['case']->value['name'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['case']->value['dealer'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['case']->value['receive_date'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['case']->value['finish_date'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['case']->value['except_date'];?>
</td>
					<td><?php echo $_smarty_tpl->tpl_vars['case']->value['status'];?>
</td>
					<td>
						<?php if ($_SESSION['user']['Name'] == $_smarty_tpl->tpl_vars['case']->value['dealer'] && $_smarty_tpl->tpl_vars['case']->value['status'] == '已分配') {?>
						<a class="am-btn am-btn-success" href="index.php?action=Cases&func=finish&id=<?php echo $_smarty_tpl->tpl_vars['case']->value['c_id'];?>
">完成</a>
						<?php }?>
					</td>

				</tr>

			<?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
		</table>
		
	</body>
</html>
<?php }
}
